package com.gang.mars.basic.annotation;

import lombok.SneakyThrows;

import java.lang.reflect.Method;

/**
 * @author gang.chen
 * @Date 2022/9/14 8:30
 */
public class Apple02Main {

    @SneakyThrows
    public static void main(String[] args) {

        //Class -> Method -> Annotation -> Value

        Class<?> aClass = Class.forName(Apple02Test.class.getName());

        Method getCurrentDateMethod = aClass.getMethod("getCurrentDate");

        Apple02Anno annotation = getCurrentDateMethod.getAnnotation(Apple02Anno.class);

        String annotationDate = annotation.DateCustomize();

        System.out.println(annotationDate);
    }
}
